package com.yooohooo.designpattern.bridge;

/**
 * @ClassName: Phone
 * @Description:
 * @author Yooo
 * @date 2017年6月22日 上午7:39:33
 * 
 */
public class Phone {
	private Charger charger;
	private Locker locker;
	private Camera camera;

	public void charge() {
		if (this.charger == null) {
			return;
		}

		this.charger.charge();
	}

	public void unlock() {
		if (locker == null) {
			return;
		}

		this.locker.unlock();
	}

	public void takePicture() {
		if (this.camera == null) {
			return;
		}
		this.camera.takePicture();
	}

	public void setCharger(Charger charger) {
		this.charger = charger;
	}

	public void setLocker(Locker locker) {
		this.locker = locker;
	}

	public void setCamera(Camera camera) {
		this.camera = camera;
	}
}
